package pro.lingwu.station.dto.db;

import io.swagger.annotations.ApiModel;
import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.sql.Date;

/**
 * @author @lingwu
 * @date created in 2021/11/15
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("Driver")
public class Driver {

    @NotNull
    @Size(max = 15, min = 10)
    @Pattern(regexp = "[0-9a-zA-Z]{10,15}")
    private String account;

    @NotNull
    private String password;

    @NotNull
    private String name;

    @NotNull
    private String phone;

    @NotNull
    private Date birthday;

    @NotNull
    private Date hireDate;

    @Email
    private String email;

    private int status = 0;
}
